//
//  YTSelecteJobViewController.m
//  YiTuDriverClient
//
//  Created by 石少庸 on 2017/7/3.
//  Copyright © 2017年 Yitu. All rights reserved.
//

#import "YTSelecteJobViewController.h"

@interface YTSelecteJobViewController ()

@end

@implementation YTSelecteJobViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableView.tableFooterView = [UIView new];
}

- (void)dealloc {}

#pragma mark - Table view data source

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return _dataArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"YTSelectedJob" forIndexPath:indexPath];
    cell.textLabel.text = _dataArray[indexPath.row];
    return cell;
}
 
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    if (_seletedJobCallBack) { // 选择回调
        _seletedJobCallBack(_dataArray[indexPath.row]);
        [self.navigationController popViewControllerAnimated:YES];
    }
}


@end
